<template>
  <div>
    <div v-html="html" id="parent"></div>
  </div>
</template>

<script>
  import {onlinePage} from '@/api/onlineAPI'
  export default {
    name: 'routeToPage',
    data () {
      return {
        html: null
      }
    },
    methods:  {
      clickBtn () {
        alert(1);
      }
    },
    mounted () {
      if (this.$route && this.$route.query) {
        let para = { fileName:  this.$route.query.newFileName}
        onlinePage(para).then(res => {
          this.html = res
        })
      }
    }
  }

</script>

<style>
  #parent {
    width: 70%;
    margin: 0 auto;
  }
</style>
